package com.server.modules.wx.web;

import io.github.elkan1788.mpsdk4j.mvc.WechatWebSupport;
import io.github.elkan1788.mpsdk4j.core.WechatDefHandler;
import io.github.elkan1788.mpsdk4j.util.ConfigReader;
import io.github.elkan1788.mpsdk4j.vo.MPAccount;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.logging.Logger;

import static org.nutz.dao.util.Pojos.log;

/**
 * Created by Administrator on 2016/10/31.
 */
/*
@Controller
@RequestMapping("/wx/mp")
public class WeiXinController extends WechatWebSupport{
    private static final ConfigReader _cr = new ConfigReader("/mp.properties");
    @Override
    public void init() {
        log.info("====== SpringMVC环境 =======");
        MPAccount mpact = new MPAccount();
        // 修改为实际的公众号信息,可以在开发者栏目中查看
        mpact.setAppId("wx****");
        mpact.setAppSecret("***");
        mpact.setToken("***");
        mpact.setAESKey("******");
        _wk.setMpAct(mpact);
        _wk.setWechatHandler(new WechatDefHandler());
    }

    @RequestMapping("/wechatcore")
    public void wechatCore(HttpServletRequest req, HttpServletResponse resp) throws Exception {
        this.interact(req, resp);
    }
}
*/
